package lianxi;

import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        System.out.println("请输入一个0-9之间正整数：");
        int n = new Scanner(System.in).nextInt();
        if (n<0||n>9){
            System.err.println("输入错误");
            return;
        }
        int sum = 0,bit = 0;
        for (int i = 1; i <= 5; i++) {
            bit = (int) (bit + n * Math.pow(10, i - 1));
//            System.out.println(bit);
            sum = sum+bit;

        }
        System.out.println("结果为："+sum);

        for (int x = 0; x < 36; x++) {
            for (int y = 0; y < 36; y++) {
                for (int k = 0; k < 36; k++) {
                    if (x+y+k==36&&x*4+y*3+k/2==36&&k%2==0){
                        System.out.println("男的有"+x+"个人"+
                                "女的有"+y+"个人"+
                                "小的有"+k+"个人");
                    }
                }
            }
        }
    }
}
